package com.dhn.service.Impl;

import com.dhn.entity.Department;
import com.dhn.mapper.DepartmentMapper;
import com.dhn.service.DepartmentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DepartmentServiceImpl implements DepartmentService {
    @Autowired
    private DepartmentMapper departmentMapper;
    @Override
    public List<Department> getDepartments(Department department) {
        return departmentMapper.getDepartments(department);
    }

    @Override
    public int getTotal(Department department) {
        return departmentMapper.getTotal(department);
    }

    @Override
    public int delDepartment(int id) {
        return departmentMapper.delDepartment(id);
    }
}
